package com.atguigu.security.custom;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

//注意继承，如果不继承会报错

/**
 * Field userDetailsService in com.atguigu.security.config.WebSecurityConfig required a bean of type
 * 'org.springframework.security.core.userdetails.UserDetailsService' that could not be found.
 */
public interface UserDetailsService extends org.springframework.security.core.userdetails.UserDetailsService {
    /**
     * 根据用户名获取用户对象（获取不到直接抛异常）
     */
    @Override
    UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;
}
